<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>检测元素可见性</title>
    <link rel="stylesheet" href="./index.css" />
  </head>
  <body>
    <!-- 示例一 -->
    <!-- <div class="target"></div> -->
    <!-- 示例二: 不以视口作为根元素 -->
    <div class="container">
      <div class="target"></div>
    </div>
    <script src="./index.js"></script>
  </body>
</html>
